<template>
	<div class="bg-blue-furn">
		<div class="flex align-center margin-top padding-lr padding-top">
			<div class="flex-sub ip-box">浇注重量</div>
			<div class="flex-sub margin-lr ip-box">铸坏重量</div>
			<div class="flex-sub ip-box">产出率</div>
			<div class="flex-sub margin-left ip-box">铸坯数量</div>
		</div>
		<div class="flex align-center margin-top padding-lr">
			<div class="flex-sub lc-input ip-box">120.3</div>
			<div class="flex-sub margin-lr lc-input ip-box">169.57</div>
			<div class="flex-sub lc-input ip-box">141.0 %</div>
			<div class="flex-sub margin-left lc-input" style="flex: 0 0 250px">56=9+9+9+10+10+9</div>
		</div>

		<!-- 铸坯实绩 -->
		<pol-table class="margin-top" ref="polTableRef" v-bind="tableOpt" height="calc(100vh - 448px)">
			<template #feipeizhongliang="{row}">
				<span class="text-green2 cursor">{{row.ItemCode === '未发送' ? '发送' : '重发'}}</span>
			</template>
		</pol-table>
	</div>
</template>

<script setup>
	import { ref } from 'vue';

	const polTableRef = ref(null); //表格ref
	//表格配置
	const columns = ref([
		{ label: '实绩发送', key: 'ItemCode', align: 'center' },
		{ label: '铸坏状态', key: 'ItemName', align: 'center' },
		{ label: '二级坯号', key: 'ItemValue', align: 'center' },
		{ label: '打号状态', key: 'IsDefault', align: 'center' },
		{ label: '计划打号号码', key: 'P_IsSys', align: 'center', width: '140' },
		{ label: '实际打号号码', key: 'P_IsReadOnly', align: 'center', width: '140' },
		{ label: '铸流序号', key: 'Status', align: 'center' },
		{ label: '铸坯类型', key: 'SortNo', align: 'center' },
		{ label: '铸坯去向', key: 'daotai', align: 'center' },
		{ label: '实际铸坯长度', key: 'zhengchang', align: 'center', width: '140' },
		{ label: '操作', key: 'feipeizhongliang', align: 'center', width: '70', slot: true },
	]);

	//表格配置
	const tableOpt = ref({
		columns: columns.value,
		localData: [{
				ItemCode: '未发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '未发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '未发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '未发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '未发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '已发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '已发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '已发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			},
			{
				ItemCode: '已发送',
				ItemName: '产生中',
				ItemValue: '1009000',
				IsDefault: '出坯辊道',
				P_IsSys: '20186470101',
				P_IsReadOnly: '20186470101',
				Status: '第1流',
				SortNo: '正常',
				daotai: '冷床',
				zhengchang: '0.92',
			}
		]
	});
</script>

<style lang="scss" scoped>
	.lc-input {
		padding: 10px;
		border: 1px solid #e1e1e1;
		border-radius: 4px;
		background-color: #0c2f63;
	}
	.ip-box {
		flex: 0 0 180px;
	}
</style>